#include"Shm.hpp"

int main()
{
    Shm sharedmam;
    sharedmam.Create();
    sharedmam.Attach();

    sleep(2);

    sharedmam.PrintAttr();

    char* shm_start=(char*)sharedmam.Addr();
    int size=sharedmam.Size();

    while(true)
    {
        for(int i=0;i<size;i++)
        {
            std::cout<<shm_start[i]<<' ';
        }
        std::cout<<std::endl;
        sleep(1);
    }

    sharedmam.Detach();
    sharedmam.Delete();

    return 0;
}